package com.xiu.travel.portal.client;

import com.xiu.travel.portal.OpenFeignConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;

@Component
@FeignClient(name = "order", url = OpenFeignConfig.TEST_API_URL)
public interface OrderClient {

    @PostMapping("/distribution/api/order/submit?access_token={token}")
    String submit(@RequestBody Object dto, @PathVariable("token") String token);

    @PostMapping("/distribution/api/order/cancel?access_token={token}")
    String cancel(@RequestBody Object dto, @PathVariable("token") String token);

    @PostMapping("/distribution/api/order/detail?access_token={token}")
    String detail(@RequestBody Object dto, @PathVariable("token") String token);


    @PostMapping("/distribution/api/order/confirm?access_token={token}")
    String confirm(@RequestBody Object dto, @PathVariable("token") String token);

    @PostMapping("/distribution/api/order/issue?access_token={token}")
    String issue(@RequestBody Object dto, @PathVariable("token") String token);


    @PostMapping("/distribution/api/order/ticket/rule?access_token={token}")
    String ticketRule(@RequestBody Object dto, @PathVariable("token") String token);

    @PostMapping("/distribution/api/order/ticket/rule/fee?access_token={token}")
    String ticketRuleFee(@RequestBody Object dto, @PathVariable("token") String token);

    @PostMapping("/distribution/api/order/refund/submit?access_token={token}")
    String refundSubmit(@RequestBody Object dto, @PathVariable("token") String token);


    @PostMapping("/distribution/api/order/ticket/can/refund?access_token={token}")
    String ticketCanRefund(@RequestBody Object dto, @PathVariable("token") String token);

    @PostMapping("/distribution/api/order/change/flight/list?access_token={token}")
    String changeFlightList(@RequestBody Object dto, @PathVariable("token") String token);

    @PostMapping("/distribution/api/order/change/confirm?access_token={token}")
    String changeConfirm(@RequestBody Object dto, @PathVariable("token") String token);

    @PostMapping("/distribution/api/order/change/submit\n?access_token={token}")
    String changeSubmit(@RequestBody Object dto, @PathVariable("token") String token);

    @PostMapping("/distribution/api/order/attachment/upload\n?access_token={token}")
    String attachmentUpload(@RequestBody Object dto, @PathVariable("token") String token);

    @PostMapping("/distribution/api/order/attachment/submit\n?access_token={token}")
    String attachmentSubmit(@RequestBody Object dto, @PathVariable("token") String token);

}
